package Three_ZhuChangShuang;

import Three_ZhuChangShuang.entity.Adenovirus;
import Three_ZhuChangShuang.entity.Inactivated;
import Three_ZhuChangShuang.entity.Person;
import Three_ZhuChangShuang.menu.AdminMenu;
import Three_ZhuChangShuang.menu.Menu;
import Three_ZhuChangShuang.menu.UserMenu;
import Three_ZhuChangShuang.service.AdminService;
import Three_ZhuChangShuang.service.UserServices;

/**
 * @Author zhu
 * @Date 2021/3/24 11:30
 * @ClassNmae VaccineSystem
 * @Description 测试类
 */
public class VaccineSystem {
    public static void main(String[] args) {
        Person person[]=new Person[10];
        Menu menu=new Menu();

        //用户菜单 和 管理员菜单
        UserMenu userMenu = new UserMenu();
        AdminMenu adminMenu = new AdminMenu();

        //用户服务类 和 管理员服务类
        UserServices userServices = new UserServices();
        AdminService adminService = new AdminService();

        //灭活疫苗 和 腺病毒疫苗
        Adenovirus adenovirus = new Adenovirus();
        Inactivated inactivated = new Inactivated();

        userMenu.setUserServices(userServices);
        userServices.setMenu(menu);
        userServices.setInactivated(inactivated);
        userServices.setAdenovirus(adenovirus);
        userServices.setPersons(person);

        adminMenu.setAdminService(adminService);
        adminService.setPersons(person);

        menu.setAdminMenu(adminMenu);
        menu.setUserMenu(userMenu);
        menu.setPersons(person);

        //系统开始
        menu.start();
    }
}
